import React, { Dispatch, SetStateAction } from 'react'
import { PageVal } from '../App'

export const NavBar = ({ setPage }: { setPage: Dispatch<SetStateAction<PageVal>> }) => {
  return (
    <nav>
      <button onClick={()=>setPage('planets')}>Planets</button>
      <button onClick={()=>setPage('people')}>People</button>
    </nav>
  )
}
